package com.spring.mvc.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @version 1.0.0
 * @Date: 2022/6/18 11:26
 * @Author ZhuYouBin
 * @Description
 */
@Controller
public class RedirectController {

    @RequestMapping("/index")
    public String index() {
        // 跳转到 index.jsp 页面
        return "index";
    }

    @RequestMapping("/redirect")
    public String redirect() {
        // 重定向到 /index 路径
        return "redirect:/index";
    }

}
